package com.yipao.db.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import com.yipao.db.domain.YipaoAd;
import com.yipao.db.domain.YipaoAdExample;

public interface AdMapper {

    long countByExample(YipaoAdExample example);


    int deleteByExample(YipaoAdExample example);


    int deleteByPrimaryKey(Integer id);


    int insert(YipaoAd record);


    int insertSelective(YipaoAd record);


    YipaoAd selectOneByExample(YipaoAdExample example);


    YipaoAd selectOneByExampleSelective(@Param("example") YipaoAdExample example, @Param("selective") YipaoAd.Column... selective);


    List<YipaoAd> selectByExampleSelective(@Param("example") YipaoAdExample example, @Param("selective") YipaoAd.Column... selective);

    /**
     * 条件查询广告
     *
     * @param example
     * @return
     */
    List<YipaoAd> selectByExample(YipaoAdExample example);


    YipaoAd selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") YipaoAd.Column... selective);


    YipaoAd selectByPrimaryKey(Integer id);


    YipaoAd selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);


    int updateByExampleSelective(@Param("record") YipaoAd record, @Param("example") YipaoAdExample example);


    int updateByExample(@Param("record") YipaoAd record, @Param("example") YipaoAdExample example);


    int updateByPrimaryKeySelective(YipaoAd record);


    int updateByPrimaryKey(YipaoAd record);


    int logicalDeleteByExample(@Param("example") YipaoAdExample example);


    int logicalDeleteByPrimaryKey(Integer id);
}
